package org.jeecg.modules.nongjt.certificate.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.nongjt.area.service.INjtAreaService;
import org.jeecg.modules.nongjt.certificate.entity.NjtCertificate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 合格证打印数据 前端控制器
 * </p>
 *
 * @author tianshao
 * @since 2022-06-17
 */
@RestController
@RequestMapping("/njt-certificate")
public class NjtCertificateController {
    @Autowired
    private INjtAreaService iNjtAreaService;
    @GetMapping("/list")
    public Result<?> getPageList(NjtCertificate njtCertificate,
                                              int pageNum, int pageSize,
                                              String dateBegin, String dateEnd)
    {
        Page<NjtCertificate> Page = new Page<>(pageNum, pageSize);
        IPage<NjtCertificate> iPage=iNjtAreaService.getPageList(Page,njtCertificate,dateBegin,dateEnd);
        System.out.println(iPage);
        return Result.OK(iPage);
    }
}

